﻿@{
    ViewData["Title"] = "Home Page";
}
@model TimeModel
<hr />
<div class="container">
    @{
        if (Model.HasSet)
        {
            <form action="~/home/CancelTime" method="post">
                @Model.Message
                @if (Model.HasExecuted)
                {
                    <label>3分钟后</label>
                }
                else
                {
                    <label>@Model.ShutDownTime.Value.ToString("yyyy-MM-dd HH:mm:ss")</label>
                }
                <input type="submit" class="btn-primary" value="取消关机" />
            </form>
        }
        else
        {
            <form action="~/home/SetTime" method="post">
                @Model.Message
                <input type="text" required name="ShutDownTime" value="@Model.ShutDownTime.Value.ToString("yyyy-MM-dd HH:mm:ss")">
                <input type="submit" class="btn-danger" value="设定关机" />
            </form>
        }

    }

</div>

